package com.shermanzhou.springbootflowable.demo.custom.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author zhouchaoqun02
 * @date 2020-06-14 19:41
 */
public interface CustomActQueryMapper {

    @Select({ "select t.* from ${table} t where t.PROC_INST_ID_ = #{procInstId}" })
    List<Map<String, Object>> select(String table, String procInstId);

    @Select({ "<script>",
            "select t.* from act_ge_bytearray t where t.ID_ in ",
            "<foreach collection=\"ids\" item=\"id\" open=\"(\" close=\")\" separator=\",\" > ",
            "#{id}",
            "</foreach>",
            "</script>"
    })
    List<Map<String, Object>> selectGeByteArray(@Param("ids") List<String> ids);
}
